#ifndef SCENEGRAPHNODE_H
#define SCENEGRAPHNODE_H

//Mac OS 10.5 OpenGL Libraries
//#include <GLUT/glut.h>

//Windows/Linux OpenGL Libraries
#include <GL/glut.h>

//#include <Magick++.h>

#include "../../collisions.h"

using namespace collisions;

namespace scenegraph
{
	/**
	 * Abstract base class for all nodes in the scengraph
	 */
	class SceneGraphNode {
		// Rotation
		float rotAxis[3];
		float angle;
		// Translation
		float translate[3];
		// Scaling
		float scale[3];

	protected:
		// Transform used for rendering
		GLfloat transform[16];

	public: 
		SceneGraphNode();
		virtual ~SceneGraphNode();
		void setTranslation( const float translation[3] );
		void setTranslation( float x, float y, float z);
		void setTranslation( const Vector3D translation);

		void incTranslation( const float translate[3] );
		void incTranslation( float x, float y, float z);
		void incTranslation( const Vector3D translation);

		void setScale( const float translation[3] );
		void setScale( float x, float y, float z);
		void setScale( const Vector3D newScale);

		void incScale( const float scale[3] );
		void incScale( float x, float y, float z);
		void incScale( const Vector3D newScale);

		void setAxisAngle( const float axis[3], float angle );
		void setAxisAngle( float x, float y, float z, float angle);
		void setAxisAngle( const Vector3D axis, float angle);

		void getAxisAngle( float axis[3], float* angle );
		void getAxisAngle( float* x, float* y, float* z, float* angle);
		void getAxisAngle( Vector3D* axis, float* angle);

		Vector3D getTranslation();

		void operator+=(const Vector3D translationVector);
		void operator-=(const Vector3D translationVector);

		// recursive drawing routine
		virtual void draw()=0;
		virtual void destroy();
	protected:
		void updateTransform();
	};
}
#endif